///错误编码
class RDError extends Error {
  ///网络错误
  static const NETWORK_ERROR = -1;

  ///网络超时
  static const NETWORK_TIMEOUT = -2;

  ///网络返回数据格式化一次
  static const NETWORK_JSON_EXCEPTION = -3;

  /// code == null
  static const NETWORK_CODE_EMPTY = -4;

  /// code == null
  static const NETWORK_RESPONSE_ERROR = -5;

  //请求成功, 正确的操作方式
  static const int CODE_0 = 0;
  static const int CODE_200 = 200;
  static const int CODE_2001 = -2001;

  //请求成功, 消息提示
  static const int CODE_201 = 201;

  //请求成功, 消息提示
  static const int CODE_220 = 220;

  //请求失败，不打印Message
  static const int CODE_300 = 300;

  //请求失败，打印Message
  static const int CODE_330 = 330;

  //服务器内部异常
  static const int CODE_500 = 500;

  //参数为空
  static const int CODE_503 = 503;

  //没有数据
  static const int CODE_502 = 502;

  //无效的Token
  static const int CODE_510 = 510;

  //未登录
  static const int CODE_530 = 530;

  //请求的操作异常终止：未知的页面类型
  static const int CODE_551 = 551;

  //该群公告已被****删除 无法置顶
  static const int CODE__10014 = -10014;

  final int code;

  final String msg;

  RDError(this.code, this.msg);
}
